package methodReferences;

/**
 * Created with IntelliJ IDEA.
 * 类名：Student
 * 开发人员: CoderJu
 * 创建时间: 2019/3/4 21:27
 * 描述:
 * 版本：V1.0
 */
public class Student {
    private String name;
    private int score;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public Student(String name, int score) {
        this.name = name;
        this.score = score;
    }

    public Student() {
    }

    public static int compareScore(Student s1,Student s2){
        return s1.getScore()-s2.getScore();
    }

    public int compareByScoreNew(Student student){
        return this.getScore() - student.getScore();
    }
}
